package com.hrt.datasender.datadao.model;

import java.util.Date;

import com.btcode.db.fieldtype.FieldType;
import com.btcode.orm.model.BaseModel;
import com.btcode.orm.model.Field;
import com.btcode.orm.model.IField;

public class BdDoorAccessModel extends BaseModel {

    private static final long serialVersionUID = 1L;

    private static String tableName = "BD_DOOR_ACCESS";

    public static IField id = new Field(BdDoorAccessModel.class, "ID", FieldType.String, true);

    public static IField controlNo = new Field(BdDoorAccessModel.class, "CONTROL_NO", FieldType.String, false);

    public static IField doorNo = new Field(BdDoorAccessModel.class, "DOOR_NO", FieldType.String, false);

    public static IField recordNo = new Field(BdDoorAccessModel.class, "RECORD_NO", FieldType.String, false);

    public static IField recordType = new Field(BdDoorAccessModel.class, "RECORD_TYPE", FieldType.String, false);

    public static IField recordResult = new Field(BdDoorAccessModel.class, "RECORD_RESULT", FieldType.String, false);

    public static IField inOrOut = new Field(BdDoorAccessModel.class, "IN_OR_OUT", FieldType.String, false);

    public static IField carNo = new Field(BdDoorAccessModel.class, "CAR_NO", FieldType.String, false);

    public static IField recordReason = new Field(BdDoorAccessModel.class, "RECORD_REASON", FieldType.String, false);

    public static IField recordDatetime = new Field(BdDoorAccessModel.class, "RECORD_DATETIME", FieldType.String,
            false);

    public static IField datatime = new Field(BdDoorAccessModel.class, "DATATIME", FieldType.DateTime, false);

    public void setId(String value) {
        setFieldValue(id.getFieldName(), value);
    }

    public String getId() {
        Object value = getFieldValue(BdDoorAccessModel.id.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setControlNo(String value) {
        setFieldValue(controlNo.getFieldName(), value);
    }

    public String getControlNo() {
        Object value = getFieldValue(BdDoorAccessModel.controlNo.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setDoorNo(String value) {
        setFieldValue(doorNo.getFieldName(), value);
    }

    public String getDoorNo() {
        Object value = getFieldValue(BdDoorAccessModel.doorNo.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setRecordNo(String value) {
        setFieldValue(recordNo.getFieldName(), value);
    }

    public String getRecordNo() {
        Object value = getFieldValue(BdDoorAccessModel.recordNo.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setRecordType(String value) {
        setFieldValue(recordType.getFieldName(), value);
    }

    public String getRecordType() {
        Object value = getFieldValue(BdDoorAccessModel.recordType.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setRecordResult(String value) {
        setFieldValue(recordResult.getFieldName(), value);
    }

    public String getRecordResult() {
        Object value = getFieldValue(BdDoorAccessModel.recordResult.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setInOrOut(String value) {
        setFieldValue(inOrOut.getFieldName(), value);
    }

    public String getInOrOut() {
        Object value = getFieldValue(BdDoorAccessModel.inOrOut.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setCarNo(String value) {
        setFieldValue(carNo.getFieldName(), value);
    }

    public String getCarNo() {
        Object value = getFieldValue(BdDoorAccessModel.carNo.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setRecordReason(String value) {
        setFieldValue(recordReason.getFieldName(), value);
    }

    public String getRecordReason() {
        Object value = getFieldValue(BdDoorAccessModel.recordReason.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setRecordDatetime(String value) {
        setFieldValue(recordDatetime.getFieldName(), value);
    }

    public String getRecordDatetime() {
        Object value = getFieldValue(BdDoorAccessModel.recordDatetime.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setDatatime(Date value) {
        setFieldValue(datatime.getFieldName(), value);
    }

    public Date getDatatime() {
        Object value = getFieldValue(BdDoorAccessModel.datatime.getFieldName());
        Date result = getValueConver().converToDate(value);
        return result;
    }

    public String getTableName() {
        return tableName;
    }

    public boolean isNeedCache() {
        return false;
    }

}